<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			<h1>通过style设置样式</h1>
			<div style="color: red;font-size: 17px;">Hello world!</div>
			<h1>vue绑定style设置样式</h1>
			<div :style="{color:textColor,fontSize:size+'px'}">Hello world!</div>
			<input type="text" v-model.lazy="textColor" /><br />
			<input type="number" v-model.lazy="size"/><br />
			<input  type="color" v-model="textColor"/><br />
			<button @click="size++">+</button>
			<button @click="size--">-</button>
		</div>
		
		<script>
			var app = Vue.createApp({
				data() {
					return {
						textColor: 'red',
						size: 17
					}
				}
			});
			var vm = app.mount("#app")
		</script>



	</body>
</html>